﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Utility1;

namespace eDream.Page
{
    public partial class Dinh_duong_detail : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
                Bindata();
        }
        void Bindata()
        {
            int id=0;
            if(Request.QueryString["k"]!=null)
                id=int.Parse(Request.QueryString["k"]);
            DataClasses1DataContext dx = new DataClasses1DataContext();
            var list = from k in dx.New_s
                       where k.ID == id && k.flag==true
                       select k;
            foreach (New_ n in list)
            {
                lbTitle.Text = n.title;
                lbcontent.Text = n.content;
            }
        }
    }
}